var qiehuan = document.querySelector('.qiehuan')
var neirong = document.querySelector('.neirong')
var neirong2 = document.querySelector('.neirong2')
var neirong3 = document.querySelector('.neirong3')
var bianse = document.querySelectorAll('.qiehuan .one')
qiehuan.addEventListener('click', function(e) {
    console.log(e.target.innerText);
    for (let i = 0; i < bianse.length; i++) {
        bianse[i].className = 'one'
    }
    e.target.className = 'one xuanzhong'
    if (e.target.innerText == '人气') {
        neirong.style.display = 'block'
        neirong2.style.display = 'none'
        neirong3.style.display = 'none'
    } else if (e.target.innerText == '销量') {
        neirong.style.display = 'none'
        neirong2.style.display = 'block'
        neirong3.style.display = 'none'
    } else if (e.target.innerText == '价格 ' || e.target.innerText == '') {
        neirong.style.display = 'none'
        neirong2.style.display = 'none'
        neirong3.style.display = 'block'
    } else {
        return
    }
})